package com.eascs.workflow.sys.dao;

import java.util.List;
import java.util.Map;

import com.eascs.app.dao.PageResult;
import com.eascs.web.sso.User;
import com.eascs.workflow.common.entity.sys.ActOrgRoleUserEntity;
import com.eascs.workflow.common.vo.ModelResult;
import com.eascs.workflow.common.vo.OrgUserRoleVo;

public interface SysOrgRoleUserDao {

	/***
	 * 搜索用户权限
	 * @param param
	 * @param pageSize
	 * @param pageIndex
	 * @return
	 */
	public PageResult<OrgUserRoleVo> searchOrgUserRolePage(Map<String, String> param, int pageSize,int pageIndex);
	
	/**
	 * 新增或修改用户角色权限
	 * @param orgRoleUserEntity
	 * @return
	 */
	public Integer saveOrUpdateOrgUserRole(ActOrgRoleUserEntity orgRoleUserEntity);
	
	/**
	 * 根据员工编号新增用户角色权限
	 * @param orgRoleUserEntity
	 * @return
	 */
	public Integer insertOrgUserRoleByempno(User user,String employeeNo,String roleId, String orgId);
	
	/**
	 * 
	 * @param userNo
	 * @param roleId
	 * @return
	 */
	public Boolean checkExist(String userNo, String roleId, String orgId);
	
	/**
	 * 删除角色权限
	 * @param id
	 * @return
	 */
	public Integer deleteById(String id);
	
	public List<ActOrgRoleUserEntity> getUserRoleList(String userNo);

	public List<ActOrgRoleUserEntity> getUserRoleListWithOrgId(String userNo,String orgId);


	 /**
     * 查询组织架构关系分页列表
     * @param 
     * @return
     */
    public PageResult<Object[]> selectOrgRoleUserPage(ActOrgRoleUserEntity obj,int pageSize,int pageIndex);
    
    public List<User> getUserWithRoleCode(String roleCode);
    
    public List<User> getUserWithUnitNoAndRoleCode(String unitNo, List<String> roleCodeList);
}
